<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml"> 
 
<head> 
	<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> 
	<title>修改最大表码值</title> 
	
	<link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/text.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/form.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/buttons.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/grid.css" type="text/css" media="screen" title="no title" />	
	<link rel="stylesheet" href="../css/layout.css" type="text/css" media="screen" title="no title" />	
	
	<link rel="stylesheet" href="../css/ui-darkness/jquery-ui-1.8.12.custom.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/jquery.visualize.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/facebox.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/uniform.default.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/dataTables.css" type="text/css" media="screen" title="no title" />
	
	<link rel="stylesheet" href="../css/custom.css" type="text/css" media="screen" title="no title">
	<script src="../js/jquery/jquery-3.3.1.js"></script>
	<script src="../layui/layui.js" type="text/javascript" ></script>
	<script>
		var url =  new URLSearchParams(location.search);

		$(function(){
			$("#id").val(url.get("id"));
			$("#userno").val(url.get("userno"));
			$("#meterno").val(url.get("meterno"));
			$("#maxvalue").val(url.get("maxval"));
			$("#username").val(url.get("username"));
			$("#beforeMax").val(url.get("maxval"));
		})
		var bool=true;
		function  check(val) {
			var length=val.length;
			for(i=0;i<length;i++){
				if(val[i]!=9){
					alert("文本框只能为九");
					bool=false;
					return ;
				}
			}
		}
		function  submitthis() {
		$.ajax({
			type:"PUT",
			url:"/rd-read/updateMaxVlaue",
			data:$("#f1").serialize(),
			success:function(data){
				parent.content.getReadafterupdate();
				var mylay = parent.layer.getFrameIndex(window.name);
				parent.layer.close(mylay);
			}

		})
		}
		function closethis(){
			var mylay = parent.layer.getFrameIndex(window.name);
			parent.layer.close(mylay);
		}
	</script>
</head> 
 
<body style="text-align: center">

	<form id="f1" class="form label-inline uniform ">
		<h2>修改最大表码值</h2>
		<input type="hidden" id="id" name="id">
		<div class="field">用户编码</label>
		<input style="background-color: lightgrey" size="50" id="userno" name="UserNo" type="text"  class="medium"  readonly="readonly" /></div>
		
		<div class="field">表身码</label>
		<input style="background-color: lightgrey" size="50" id="meterno" name="MeterNo" type="text" class="medium"   readonly="readonly" /></div>
		
		<div class="field">用户姓名</label>
		<input style="background-color: lightgrey" size="50" id="username" type="text" class="medium"  readonly="readonly" /></div>
		
		<div class="field">最大表码值</label>
			<input type="hidden" id="beforeMax" name="beforeMax">
		<input size="50" id="maxvalue" name="MaxValue" type="text" class="medium" value="9999" onkeyup="check(this.value)"/></div>
	
		<div  style="text-align: center">
			<input type="button" onclick="submitthis()" class="btn" value="确定"></input>
			<button class="btn btn-grey" onClick="closethis();">关闭</button>
		</div>
	
	</form>

<script src="../js/jquery/jquery-1.5.2.min.js"></script>
<script src="../js/jquery/jquery-ui-1.8.12.custom.min.js"></script>
<script src="../js/misc/excanvas.min.js"></script>
<script src="../js/jquery/facebox.js"></script>
<script src="../js/jquery/jquery.visualize.js"></script>
<script src="../js/jquery/jquery.dataTables.min.js"></script>
<script src="../js/jquery/jquery.tablesorter.min.js"></script>
<script src="../js/jquery/jquery.uniform.min.js"></script>
<script src="../js/jquery/jquery.placeholder.min.js"></script>

<script src="../js/widgets.js"></script>
<script src="../js/dashboard.js"></script>

<script type="text/javascript">
	
$(document).ready ( function () 
{
	Dashboard.init ();		
});

</script>

</body> 
 
</html>